﻿using ACC.Business;
using ACC.Business.Utils;
using ACC.Data.Line;
using ACC.Device.PLC;
using ACC.Device.PLC.Siemens;
using ACC.LineDevice.KukaPack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Script
{
    public class PL02_SXT : LineProcessKukaPack
    {
        public PL02_SXT(LineData data)
            : base(data)
        {
            restfulUrl = "http://127.0.0.1:4002/api/KukaPack/";
        }
        
        /// <summary>
        /// 初始化ACC连接PLC使用的Driver配置
        /// </summary>
        protected override void InitDriver()
        {
            base.InitDriver();

            /*
             * 以下代码用于设定使用虚拟PLC
             */

            //////获取在Config中配置的Device对应的Driver
            //PLCDriver driver = (PLCDriver)LineDeviceDrivers["PLC17"];
            //driver.SetBaseDriver(new VSiemensDriver_Base(driver.DeviceCfg));
            //driver = (PLCDriver)LineDeviceDrivers["PLC_20"];
            //driver.SetBaseDriver(new VSiemensDriver_Base(driver.DeviceCfg));
        }
    }
}
